<template>
  <div>
    <el-card shadow="never" class="mb20">
      <contact-form @search="handleSearch" ref="contactForm" />
    </el-card>
    <el-card shadow="never">
      <contact-table @edit="handleEdit" ref="contactTable" />
    </el-card>
    <contact-modal @refresh="handleSearch" ref="contactModal" />
  </div>
</template>

<script>
import ContactForm from './ContactForm'
import ContactTable from './ContactTable'
import ContactModal from './ContactModal'

export default {
  components: {
    ContactForm,
    ContactTable,
    ContactModal
  },
  methods: {
    handleSearch(param = {}) {
      this.$refs.contactTable.handleGetList(param)
    },
    handleEdit(bool, row, view = false) {
      this.$refs.contactModal.edit(bool, row, view)
    }
  }
}
</script>